# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-vfs-sacd
pkgver=20.1.0
_realname=Nexus
pkgrel=1
pkgdesc="SACD VFS add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/vfs.sacd"
arch="x86_64 aarch64 armv7" # kodi is available only on these architectures
license="GPL-2.0-only"
makedepends="cmake libssh-dev kodi-dev samurai"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/vfs.sacd/archive/$pkgver-$_realname.tar.gz
	int-conversion.patch
	"
builddir="$srcdir/vfs.sacd-$pkgver-$_realname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
50d6272465dc55c4b08479e72f3751eb5efc7075c1aa10c51a7fd7d1bc5b3135961b971f34ffe354cc45679635dc2db460c8b04f3d1dd4afe877d2295feb2ca6  kodi-vfs-sacd-20.1.0-Nexus.tar.gz
6be95313c2a5a97dc9ed50d90c2311b2486eb4b05e2a4f4aca9e2da8cad1193de4d8bc945a24e77b964b6072f5805018b7cc18b78112bb942fb58f99be62dd6c  int-conversion.patch
"
